package com.tsing.spring_learn.config;

import com.tsing.spring_learn.entity.User;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Component;

//@Configuration
@Component
/**
 * 静态调用非静态
 */
public class UserConfig {
/*    private static User user;
    @Autowired
    public void getName(User user){
        UserConfig.user = user;
        System.out.println("主动注入的User："+user.getName());
    }*/




  /*  public static String getStr(){
        String str = "str is："+user.getName();
        return str;
    }*/


    public UserConfig() {
        System.out.println("Userconfig constructor starting!!!");
    }
}
